<template>
   
  <div id="print_area" v-loading="loading">
      <BottomTabs v-if="detailInfo.metadataJson" @currentTab="currentTab" :nowRowData="detailInfo" @refresh="refresh"></BottomTabs>
  </div>
</template>

<script setup lang="ts">
import BottomTabs from './bottomTabs/index.vue'
import apiMod from '@/apiMod/index'
import { printHtml } from '@/utils/print'


let loading = ref(false)
let title = ref('数据统计')

let props = defineProps({
  nowRowData:{
        type:Object,
        defalut:()=>({})
	}

}) 
// 通过id获取详情
let detailInfo:any = ref({})
const getInfoData = async(id) =>{
	loading.value = true
	let res = await apiMod.view_zwglTaskInfo_view(id)
	if(res.code==0){
		detailInfo.value = res.data
		loading.value = false
	}else{
		loading.value = false
	}
}

const refresh = () =>{
	getInfoData(props.nowRowData.id)
}

let exportShow = ref(false)
const currentTab = (activeName) =>{
  if(activeName=='taskContent'){
    exportShow.value = true
  }else{
    exportShow.value = false
  }
}
// 初始化
onMounted(()=>{
  detailInfo.value = props.nowRowData
})


</script>
<style scoped lang="scss">
.title_part{
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    margin-bottom:20px;
}
.tag_part{
    padding: 2px 10px;
    box-sizing: border-box;
    border-radius: 16px;
    background-color: red;
}
</style>